define(['jquery'
        ,'backbone'
        ,'underscore'
        ,'collections/files'
        ,'text!templates/files/list.html','jqueryui','bootstrap'],
		function($,Backbone,_,Files,fileListTemplate){
	var FileListView=Backbone.View.extend({
		initialize:function(){
			this.collection=this.options.files;
		},
		render:function(){
			var data={
				files:this.collection.models,
				_:_
			};		
			var cTemplate=_.template(fileListTemplate,data);			
			this.$el.html(cTemplate);
			$(".filelist-btn-print").tooltip({title:'Imprimir',placement:'bottom'});
			$(".filelist-btn-upload").tooltip({title:'Subir archivo',placement:'bottom'});
			$(".filelist-btn-trash").tooltip({title:'Eliminar',placement:'bottom'});
			return this;
		}
	});	
	return  FileListView;
});